#include <stdio.h>
#include <stdlib.h>
struct node *creatnode(int data);

void append(struct node *head,int data);

struct node{
	int data;
	struct node *next;
};
int main(){
	struct node *head = NULL;
	/*printf("%p\n",&head);
	printf("%p\n",head);*/
	append(head,10);
	append(head,100);
	append(head,81);
	struct node *p = head;
	while(p!=NULL){
		printf("%d\n",p->data);
		p = p->next;
	}return 0;
	
}
struct node *creatnode(int data){
	struct node *newnode = (struct node*)malloc(sizeof(struct node));
	if(newnode==NULL){
		printf("empty");
	}
	newnode->data = data;
	newnode->next = NULL;
}
void append(struct node *head,int data){
	struct node *newnode = creatnode(data);
	if(head = NULL){
		head = newnode;
	}struct node *current = head;
	while(current->next!=NULL){
		current = current->next;
	}current->next = newnode;
}


